import redis
from flask import current_app

class RedisCode():
    red = None

    def __init__(self):
        host = current_app.config.get('REDIS_HOST')
        port = current_app.config.get('REDIS_PORT')
        self.red = redis.Redis(host=host,port=port,db=5)